package ch.eureka.provider.api.facade;

import ch.eureka.provider.api.bean.User;
import org.springframework.web.bind.annotation.*;

/**
 * 重构
 * 注意@RequestParam 和 @RequestHeader 需要指定value
 */
@RequestMapping("/refactor")
public interface HelloService {

    @RequestMapping(value = "/hello4", method = RequestMethod.GET)
    String hello4(@RequestParam("name") String name);

    @RequestMapping(value = "/hello5", method = RequestMethod.GET)
    User hello5(@RequestHeader("name") String name,
                @RequestHeader("age") Integer age);

    @RequestMapping(value = "/hello6", method = RequestMethod.POST)
    String hello6(@RequestBody User user);

}
